<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
	<%@ include file="/WEB-INF/pages/weixin/include/title.jsp"%>
    <%@ include file="/WEB-INF/pages/weixin/include/include.jsp"%>
    
	<script src="${root}/res/jsLib/jquery/jquery-1.11.1.min.js"></script>
	<script src="${root}/res/jsLib/Validform_v5.3.2_min.js"></script>
	<script src="${root}/res/jsLib/ValidformExp.js"></script>
    
    <script type="text/javascript">
    	var vf;
	    $(function(){
	    	
	    	vf = $("#userForm").validform();
	    	
	    	wxUtils.initSearchBar();
	    	wxUtils.iniScrollBar();
	    	
	    	$("#submitBtn").bind("click",function(){
	    		if(vf.check()){
	    			wxUtils.showToast("正在提交");
		    		$.post(wxUtils.ctx+"/weixin/personal/register.do",$("#userForm").serialize(),function(data){
		    			wxUtils.closeToast();
		    			if(data.success){
		    				wxUtils.msg(data.msg,1,function(){
		    					window.location.href = wxUtils.ctx + "/weixin/login.do"; 
		    				});
		    			}else{
		    				wxUtils.msg(data.msg,2);
		    			}
		    		},'json');
	    		}
	    	});
	    });
	</script>
</head>
<body>
<div class="page" style="height: 100%;">
    <div class="page__bd">
    	<div class="weui-tab__panel detail_panel" style="display: none;"></div>
        <div class="weui-tab list_panel">
        	<div class="weui-navbar" position="top">
                <div class="weui-navbar__item weui-bar__item_on">个人用户注册</div>
                <div class="weui-navbar__item" onclick="wxUtils.linkClick('/weixin/enterprise.do')">企业用户注册</div>
            </div>
            <div class="weui-tab__panel">
            	<div class="weui-panel weui-panel_access" position="center">
            	<form id="userForm">
				    <div class="weui-cells weui-cells_form">
			            <div class="weui-cell">
			                <div class="weui-cell__hd"><label class="weui-label">用户名</label></div>
			                <div class="weui-cell__bd">
			                    <input class="weui-input" type="text" name="username" dataType="*4-16" placeholder="请输入用户名"/>
			                </div>
			            </div>
			            
			            <div class="weui-cell">
			                <div class="weui-cell__hd"><label class="weui-label">密码</label></div>
			                <div class="weui-cell__bd">
			                    <input class="weui-input" type="password" name="password" dataType="*4-36"  placeholder="请输入密码"/>
			                </div>
			            </div>
			            
			            <div class="weui-cell">
			                <div class="weui-cell__hd"><label class="weui-label">确认密码</label></div>
			                <div class="weui-cell__bd">
			                    <input class="weui-input" type="password" dataType="*" recheck="password" placeholder="请再次输入密码"/>
			                </div>
			            </div>
			            
			            <div class="weui-cell">
			                <div class="weui-cell__hd"><label class="weui-label">身份证号</label></div>
			                <div class="weui-cell__bd">
			                    <input class="weui-input" type="text" name="certificateNum" dataType="idcard" placeholder="请输入身份证号码"/>
			                </div>
			            </div>
			            
			            <div class="weui-cell">
			                <div class="weui-cell__hd"><label class="weui-label">E-mail</label></div>
			                <div class="weui-cell__bd">
			                    <input class="weui-input" type="text" name="email" dataType="e" placeholder="请输入E-mail"/>
			                </div>
			            </div>
			        </div>
			        <div class="weui-btn-area">
			            <a id="submitBtn" class="weui-btn weui-btn_primary" href="javascript:void(0);" >完成注册</a>
			            <a href="javascript:wxUtils.linkClick('/weixin/bind.do');" class="weui-btn weui_btn_default" style="color: #202020;">已有账号</a>
			        </div>
			    </form>
				</div>
            </div>
        </div>
    </div>
	<jsp:include page="/WEB-INF/pages/weixin/bottom.jsp?menu=4"></jsp:include>
</div>
</body>
</html>

